<?php
namespace app\common\validate;

use think\Validate;

class WorkerCateValidate extends Validate
{
    protected $rule =   [
        'id|人工分类ID'              => 'require|integer',
        'worker_cate_id|人工分类ID'  => 'require',
        'page|页数'                  => 'require|integer',
        'limit|条数'                 => 'require|integer',
        'name|分类名称'              => 'require|length:1,50',
    ];
    
    protected $scene = [
        /** 后台 */
        'show'        => ['id'],
        'add'         => ['name'],
        'edit'        => ['id', 'name'],
        'list'        => ['page', 'limit'],
    ];
}